package com.example.security.service.impl;

import com.example.security.mapper.SysDeptMapper;
import com.example.security.service.DeptService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
@RequiredArgsConstructor
public class DeptServiceImpl implements DeptService {

    private final SysDeptMapper deptMapper;

    @Override
    public List<Long> getSubDeptIds(Long deptId) {
        if (deptId == null) {
            return new ArrayList<>();
        }
        return deptMapper.selectSubDeptIds(deptId);
    }
} 